import request from '@/utils/request';

/* 门店下拉 */
export async function get_store_select(params) {
  const res = await request.post('/tenant/store/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 门店柜组下拉 */
export async function get_store_group_select(params) {
  const res = await request.post('/material/store_group/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 门店员工下拉 */
export async function get_store_user_select(params) {
  const res = await request.post('/user/store_user/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 总店员工下拉 */
export async function get_user_select(params) {
  const res = await request.post('/user/user/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 角色列表下拉 */
export async function get_role_select(params) {
  const res = await request.post('/user/role/get_list_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 货品种类列表下拉 */
export async function get_category_select(params) {
  const res = await request.post('/material/goods_category/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 货品大类列表下拉 */
export async function get_broad_class_select(params) {
  const res = await request.post('/material/broad_class/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 货品小类列表下拉 */
export async function get_subclass_select(params) {
  const res = await request.post('/material/subclass/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 金料类型下拉 - 基础资料 */
export async function get_gold_category_select2(params) {
  const res = await request.post('/material/gold_category/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 金料类型下拉 - 料结 */
export async function get_gold_category_select(params) {
  //const res = await request.post('/material/gold_category/get_select', params);
  const res = await request.post(
    '/material/gold_category/get_all_select',
    params
  );
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 系列名称下拉 */
export async function get_series_select(params) {
  const res = await request.post('/material/series/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 系列款式下拉 */
export async function get_series_style_select(params) {
  const res = await request.post('/material/series_style/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 货品款式下拉 */
export async function get_style_select(params) {
  const res = await request.post('/material/style/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 仓库下拉 */
export async function get_warehouse_select(params) {
  const res = await request.post('/material/warehouse/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 成色下拉 */
export async function get_quality_select(params) {
  const res = await request.post('/material/quality/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 供应商下拉 */
export async function get_supplier_select(params) {
  const res = await request.post('/material/supplier/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 经营品牌下拉 */
export async function get_brand_select(params) {
  const res = await request.post('/material/brand/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 门店品牌下拉 */
export async function get_store_brand_select(params) {
  const res = await request.post('/material/store_brand/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 赠品类型下拉 */
export async function get_gift_select(params) {
  const res = await request.post('/material/gift/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 工艺类型下拉 */
export async function get_technology_select(params) {
  const res = await request.post('/material/technology/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 价格类型下拉 */
export async function get_price_category_select(params) {
  const res = await request.post('/material/price_category/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 宝石类型下拉 */
export async function get_gem_category_select(params) {
  const res = await request.post('/material/gem_category/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 宝石属性下拉 */
export async function get_gem_attribute_select(params) {
  const res = await request.post('/material/gem_attribute/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 货品品类下拉 */
export async function get_classes_select(params) {
  const res = await request.post('/material/classes/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 贵金属颜色下拉 */
export async function get_metal_color_select(params) {
  const res = await request.post('/material/metal_color/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 工费类型下拉 */
export async function get_labor_category_select(params) {
  const res = await request.post('/material/labor_category/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 财务类型下拉 */
export async function get_finance_select(params) {
  const res = await request.post('/material/finance/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 石重范围下拉 */
export async function get_stone_weight_select(params) {
  const res = await request.post('/material/stone_weight/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 维修项目下拉 */
export async function get_repair_item_select(params) {
  const res = await request.post('/material/repair_item/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 费用名称下拉 */
export async function get_fee_name_select(params) {
  const res = await request.post('/setting/fee_name/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
/* 销售科目下拉 */
export async function get_sales_subject_select(params) {
  const res = await request.post('/setting/sales_subject/get_select', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
